// ==========  巡检相关 ============//
import constant from '@/utils/constant'
import request from '@/utils/request'

/**
 * 获取巡检列表
 */
export function getListInspectionTasks(data) {
	uni.showLoading({
	    title: '加载中',
	    mask: true,
	})
	
	return request({
		url: constant.listInspectionTasks,
		method: 'GET',
		data
	})
}

/**
 * 获取巡检详情
 */
export function getListInspectionTaskDetails(data) {
	uni.showLoading({
	    title: '加载中',
	    mask: true,
	})
	
	return request({
		url: constant.listInspectionTaskDetails,
		method: 'GET',
		data
	})
}

/**
 * 执行巡检提交
 */
export function updateInspectionTaskDetail(data) {
	uni.showLoading({
	    title: '提交中',
	    mask: true,
	})
	
	return request({
		url: constant.updateInspectionTaskDetail,
		method: 'POST',
		data
	})
}